<link rel="stylesheet" type="text/css" href="naanal/jquery-ui.css" />
<script type="text/javascript" src="naanal/jquery.js"></script>
<script type="text/javascript" src="naanal/jquery-ui.min.js"></script>
<script type="text/javascript">
function validateDate(datevalue)
{
    /*var txtDate = datevalue;
    var dateParts = txtDate.split('-');

    if(dateParts.length != 3) {
        var dateParts = txtDate.split('/');
        if(dateParts.length != 3) {
            alert('invalid date!');
            return false;
        }
    }

    var testDate = new Date(dateParts[2] + '/' + dateParts[1] + '/' + dateParts[0]);

    if(isNaN(testDate.getDate())) {
        alert('invalid date!');
        return false;
    }*/
    return true;
}
jQuery(function ()
{
    jQuery("#from").datepicker({dateFormat: "dd-mm-yy" });
    jQuery("#to").datepicker({dateFormat: "dd-mm-yy" });
});
</script>
<center><h1>Viger Report Create</h1> 
<form action="index.php">
    <input type="hidden" name="page" value="home" />
    <input type="hidden" name="template" value="no" />
    <input type="hidden" name="action" value="download" />
    <table style="width:50%">
        <tr>
            <td style="text-align: center;"><center>
                From : <input type="text" name="from" id="from" value="" onblur="return validateDate(this.value)" /> To : <input type="text" id="to" name="to" value="" onblur="return validateDate(this.value)" /></center>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;"><center>
                <input type="submit" name="switch" value="Range" />            
                <input type="submit" name="switch" value="Today" />
                            <input type="submit" name="switch" value="Current Week" />
                            <input type="submit" name="switch" value="Current Month" />
                            <input type="submit" name="switch" value="Current Year" />
                    </center>
                        </td>
        </tr>
        <tr>
            <td style="text-align: center;"><center>
                Back to <a href="http://crm.nistinstitute.com">Home</a></center>
            </td>
        </tr>
    </table>
</form>
</center>